<template>
  <div>
    <h1 class="title">{{ artInfo.title  }}</h1>
    <div class="info">
      <span>作者：{{ artInfo.nickname || artInfo.username }}</span>
      <span>发布时间：{{ artInfo.pub_date | dateFormat }}</span>
      <span>所属分类： {{ artInfo.cate_name }}</span>
      <span>状态：{{ artInfo.state }}</span>
    </div>

    <el-divider></el-divider>
    <!-- <hr> -->

    <img :src="'http://www.liulongbin.top:3008' + artInfo.cover_img" alt="" />
    <div v-html="artInfo.content">

    </div>
  </div>
</template>

<script>

export default {
  name: 'ArtInfo',
  // 接收父组件传递的数据
  props: {
    artInfo: {
      type: Object,
      required: true
    }
  }
}
</script>
